From bb3f79ab40264c4ae4a0b43113ecb9b2a98216bf Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Sat, 19 Jun 2010 13:40:05 +0000 Subject: [PATCH] The rendering of autosummary in History and Diff pages did not properly escape the URI fragment before creating the link. This was causing inconsistencies between anchors in editsummaries and those actually used in pages. See also bug 18431 --- RELEASE-NOTES | 1 + includes/Linker.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 965f800ae9..e38f341179 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -202,6 +202,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN a fatal error * (bug 23465) Don't ignore the predefined destination filename on Special:Upload after following a red link +* Correct the escaping of the autosummary URI fragments. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/Linker.php b/includes/Linker.php index 79e417ebe2..f6e45d1408 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1026,6 +1026,9 @@ class Linker { $section = str_replace( '[[:', '', $section ); $section = str_replace( '[[', '', $section ); $section = str_replace( ']]', '', $section ); + + # Most of Title:: expects fragments to be escaped + $section = Title::escapeFragmentForURL( $section ); if ( $local ) { $sectionTitle = Title::newFromText( '#' . $section ); } else { -- 2.20.1